#include<stdio.h>
int main()
{
	int s=0,n,i;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		s+=i;
	}
	printf("sum = %d",s);
}
void AddTime1(long n) 
{
clock_t t;
long sum;
t = clock();
sum = add1(n);
t = clock() - t;
printf("方法1：\n");
printf(" 结果：1~%d之和：%ld\n",n,sum);
printf("用时:%lf秒\n",((float)t)/CLOCKS_PER_SEC);
}